import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("部分选项禁用")

    ComboBox {
        anchors.centerIn: parent
        id: disableItemsCombo
        model: ["可用选项", "禁用选项", "另一个可用选项"]

        delegate: ItemDelegate {
            width: parent.width
            text: modelData
            enabled: modelData !== "禁用选项"
            opacity: enabled ? 1 : 0.5
        }
    }
}
